<template>
  <div v-loading="loading" class="container-bg">
    <el-row :gutter="10" style="height: 50%" type="flex">
      <el-col v-hasPermi="['statement:exportFile:resultPicture']" :span="8">
        <export-result-picture :projects="projectList" />
      </el-col>
      <el-col v-hasPermi="['statement:exportFile:proceesCompletion']" :span="8">
        <export-process-completion :projects="projectList" />
      </el-col>
      <el-col v-hasPermi="['statement:exportFile:standingBook']" :span="8">
        <export-process-standing-book :projects="projectList" />
      </el-col>
    </el-row>
    <el-row :gutter="10" style="height: 50%;margin-top: 10px;" type="flex">
      <el-col v-hasPermi="['statement:importFile:rdcData']" :span="8">
        <import-rdc-data :projects="projectList" />
      </el-col>
      <el-col v-hasPermi="['statement:exportFile:processMonthStatistics']" :span="8">
        <export-process-month-statistics />
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { getAuthCurProject } from '@/api/common'
import ExportResultPicture from './components/ExportResultPicture'
import ExportProcessCompletion from './components/ExportProcessCompletion'
import ExportProcessStandingBook from './components/ExportProcessStandingBook'
import ExportProcessMonthStatistics from './components/ExportProcessMonthStatistics'
import ImportRdcData from './components/ImportRdcData'
export default {
  name: 'ExportFile',
  components: {
    ExportResultPicture,
    ExportProcessCompletion,
    ExportProcessStandingBook,
    ImportRdcData,
    ExportProcessMonthStatistics
  },
  data() {
    return {
      /* 全局加载 */
      loading: false,
      /* 项目列表 */
      projectList: []
    }
  },
  computed: {
  },
  mounted() {
    /* 初始化列表 */
    this.init()
  },
  methods: {
    /* 初始化界面所需数据 */
    init() {
      this.getProjects()
    },
    /* 项目列表 */
    getProjects() {
      this.loading = true
      getAuthCurProject().then(response => {
        this.projectList = response.data
      }).finally(() => {
        this.loading = false
      })
    }
  }
}
</script>

<style scoped lang="scss">
/deep/ .el-card__header {
  border: 0;
}
  .container-bg {
    padding: 20px;
    height: 100%;
    width: 100%;
    background: #eeeeee;

  }
  .export-rs-msg{
    font-size:20px;
    text-align: center;
  }
  .file-path{
    font-size: 20px;
    color: #00baff;
  }
</style>
